package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerOverseasApplicationMapper;
import com.traffic.domain.PerOverseasApplication;
import com.traffic.service.IPerOverseasApplicationService;

/**
 * 出境申请Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerOverseasApplicationServiceImpl implements IPerOverseasApplicationService 
{
    @Autowired
    private PerOverseasApplicationMapper perOverseasApplicationMapper;

    /**
     * 查询出境申请
     * 
     * @param id 出境申请主键
     * @return 出境申请
     */
    @Override
    public PerOverseasApplication selectPerOverseasApplicationById(Long id)
    {
        return perOverseasApplicationMapper.selectPerOverseasApplicationById(id);
    }

    /**
     * 查询出境申请列表
     * 
     * @param perOverseasApplication 出境申请
     * @return 出境申请
     */
    @Override
    public List<PerOverseasApplication> selectPerOverseasApplicationList(PerOverseasApplication perOverseasApplication)
    {
        return perOverseasApplicationMapper.selectPerOverseasApplicationList(perOverseasApplication);
    }

    /**
     * 新增出境申请
     * 
     * @param perOverseasApplication 出境申请
     * @return 结果
     */
    @Override
    public int insertPerOverseasApplication(PerOverseasApplication perOverseasApplication)
    {
        return perOverseasApplicationMapper.insertPerOverseasApplication(perOverseasApplication);
    }

    /**
     * 修改出境申请
     * 
     * @param perOverseasApplication 出境申请
     * @return 结果
     */
    @Override
    public int updatePerOverseasApplication(PerOverseasApplication perOverseasApplication)
    {
        perOverseasApplication.setUpdateTime(DateUtils.getNowDate());
        return perOverseasApplicationMapper.updatePerOverseasApplication(perOverseasApplication);
    }

    /**
     * 批量删除出境申请
     * 
     * @param ids 需要删除的出境申请主键
     * @return 结果
     */
    @Override
    public int deletePerOverseasApplicationByIds(Long[] ids)
    {
        return perOverseasApplicationMapper.deletePerOverseasApplicationByIds(ids);
    }

    /**
     * 删除出境申请信息
     * 
     * @param id 出境申请主键
     * @return 结果
     */
    @Override
    public int deletePerOverseasApplicationById(Long id)
    {
        return perOverseasApplicationMapper.deletePerOverseasApplicationById(id);
    }
}
